<?php require_once('../connections/con_gl.php'); ?>

<?php

$bar = $_GET['barang'];
$kid = $_GET['kid'];
$jum = intval($_GET['jumlah']);
// get kendaraan
mysql_select_db($database_con_gl, $con_gl);
$query_harga = "select a.hargasewa from gl_jenbar as a inner join gl_tipekendaraan as b on (a.jenis = b.id) inner join gl_masterkendaraan as c on (b.id = c.tipekendaraan) where a.barang='$bar' AND c.nopolisi='$kid'"; //echo $query_harga;

$harga       = mysql_query($query_harga, $con_gl) or die(mysql_error());
$row_harga   = mysql_fetch_assoc($harga);
$total_harga = mysql_num_rows($harga);

?>
<input name="hargasatuan" type="text" id="hargasatuan" onchange="javascript:this.form.total.value=(this.form.jumlah.value * this.form.hargasatuan.value) - (this.form.jumlah.value * this.form.hargasatuan.value * this.form.diskon.value / 100);" value="<?php echo $row_harga['hargasewa'] * $jum;?>" size="20" maxlength="10" style="text-align:right;"/><input name="xharga" type="hidden" id="xharga" value="<?php echo $row_harga['hargasewa'];?>"/>
